#include <cstdio>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;
int main()
{
	int t;
	int a,b,c,n;

	scanf("%d",&t);
	while(t--)
	{
		int maxn = 0;
		int sum = 0;
		scanf("%d %d %d %d",&a,&b,&c,&n);
		maxn = max(a,maxn);
		maxn = max(b,maxn);
		maxn = max(c,maxn);
		sum = (maxn-a)+(maxn-b)+(maxn-c);
		if(sum>n) printf("NO\n");
		else
		{
			int ans = n-sum;
			if(ans%3) printf("NO\n");
			else printf("YES\n");
		}
	}
}
